Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

214
Vistas
Sonar issue - Remove this assignment of "k"

I am getting this issue in sonar. I don't know why it's giving this issue.

enter image description here

The code is:

for(let k=0; k<this.side_list.length; ++k){
  if(this.allowedPageList.indexOf(this.side_list[k].route) === -1){
    this.side_list.splice(k,1); --k;
  }else{
    if(this.side_list[k].children?.length > 0){
      for(let l=0; l<this.side_list[k].children.length; ++l){
        if(this.allowedPageList.indexOf(this.side_list[k].children[l].route) === -1){
          this.side_list[k].children.splice(l,1); --l;
        }
      }
    }
  }
}

Can somebody please help me fix this issue? Is sonar asking me to remove --k and --l from the code? But that can then disrupt the function.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda